﻿#region File Description
//  DomoBCI 
//  License: GNU/GPL
//  Developer: Federico Leonardo Motta
//  File description: GUI
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace DomoBCI.gui
{
    public class UIlabel: Item
    {
        protected String text;
        protected SpriteFont font;
        static int i = 0;

        public UIlabel(string f, Game Game)
            : base(Game)
        {
            ID = i;
            Name = "Label" + ID;
            font = Game.Content.Load<SpriteFont>(f);
            Dimension = Font.MeasureString(f);
            i++;
        }

        public UIlabel(String n, String t, string f, Game Game)
            : base(Game)
        {
            ID = i;
            Name = n;
            text = t;
            font = Game.Content.Load<SpriteFont>(f);
            Dimension = Font.MeasureString(f);
            i++;
            
        }

        public UIlabel(int id,String n, String t, string f, Game Game)
            : base(Game)
        {
            ID = id;
            Name = n;
            text = t;
            font = Game.Content.Load<SpriteFont>(f);
            Dimension = Font.MeasureString(f);
            i = id;
        }

        public UIlabel(String n, String t, string f, int spacing, Game Game)
            : base(Game)
        {
            ID = i;
            Name = n;
            text = t;
            font = Game.Content.Load<SpriteFont>(f);
            font.Spacing = spacing;
            Dimension = Font.MeasureString(f);
            i++;
        }

        public SpriteFont Font{
            get { return font; }
        }

        public String Text {
            set { text = value; }
            get { return text; }
        }
    }
}
